







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Creates a sorted version of a collection. A supplied IComparer<T> is used
to compare the items in the collection.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static T[] Sort<T>( IEnumerable<T> collection, IComparer<T> comparer ) |
Visual Basic (Declaration) |
---|
Public Shared Function Sort(Of T) ( _ collection As IEnumerable(Of T), _ comparer As IComparer(Of T) _ ) As T() |
Visual C++ |
---|
public: generic<typename T> static array<T>^ Sort ( IEnumerable<T>^ collection, IComparer<T>^ comparer ) |
Parameters
- collection
- IEnumerable<(Of <T>)>
The collection to sort.
- comparer
- IComparer<(Of <T>)>
The comparer instance used to compare items in the collection. Only the Compare method is used.
Return Value
An array containing the sorted version of the collection.
Type Parameters
- T
See Also
Algorithms Class
Wintellect.PowerCollections Namespace